package com.wang.cloud.manage.domain.co;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import jakarta.validation.constraints.Size;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.validator.constraints.Range;

import java.util.List;


/**
 * <p>
 * 系统-角色信息表
 * </p>
 *
 * @author wy
 * @since 2024-07-15
 */
@Getter
@Setter
@Schema(description = "系统-角色信息参数")
public class RoleCo {

    @NotBlank(message = "请填写角色名称")
    @Size(max = 32, message = "角色名称长度不能超过32字符")
    @Schema(description = "角色名称")
    private String roleName;

    @Size(max = 100, message = "角色权限字符串长度不能超过100字符")
    @Schema(description = "角色权限字符串")
    private String roleKey;

    @NotNull(message = "显示顺序不能为空")
    @Range(min = 0L, message = "显示顺序不能小于0")
    @Schema(description = "显示顺序")
    private Integer roleSort;

    @NotBlank(message = "状态不能为空")
    @Pattern(regexp = "^[01]$", message = "状态错误")
    @Schema(description = "角色状态（0正常 1停用）")
    private String status;

    @Size(max = 500, message = "备注长度不能超过500字符")
    @Schema(description = "备注")
    private String remark;

    @Schema(description = "角色拥有的菜单列表(全选)")
    private List<Long> fullMenuIds;

    @Schema(description = "角色拥有的菜单列表(半选)")
    private List<Long> halfMenuIds;

}
